home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / cxref.z / cxref
Text File  |  1998-10-30  |  8KB  |  198 lines

  1.  
  2.  
  3.  
  4. CCCCXXXXRRRREEEEFFFF((((1111))))                       SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss                       CCCCXXXXRRRREEEEFFFF((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cxref - generate C program cross-reference
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ccccxxxxrrrreeeeffff [ options ] files
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _c_x_r_e_f command analyzes a collection of C, yacc, and lex files and
  16.      attempts to build a cross-reference table.  It produces a listing on
  17.      standard output of all symbols (auto, static, and global) in each file
  18.      separately, or, with the ----cccc option, in combination.  Each symbol contains
  19.      an asterisk (*) before the declaring reference.
  20.  
  21.      If the environment variable _XPG is defined, _c_x_r_e_f operates in
  22.      conformance with the X/Open XPG4 specifications.  The format of the
  23.      output may differ in accordance to the XPG4 standards.
  24.  
  25.      In addition to the ----DDDD, ----IIII ----nnnnoooossssttttddddiiiinnnncccc and ----UUUU options [which are interpreted
  26.      just as they are by _c_c(1) and _c_p_p(1)], the following _o_p_t_i_o_n_s are
  27.      interpreted by _c_x_r_e_f:
  28.  
  29.      ----cccc      Print a combined cross-reference of all input files.
  30.  
  31.      ----hhhh      Do not print column headers.
  32.  
  33.      ----wwww<_n_u_m> Width option which formats output no wider than <num> (decimal)
  34.              columns.  This option will default to 80 if <num> is not
  35.              specified or is less than 51.  If _XPG is set then there should
  36.              be at least one space between -w and num.
  37.  
  38.      ----oooo file Direct output to _f_i_l_e.
  39.  
  40.      ----ssss      Operate silently; do not print input file names.
  41.  
  42.      ----tttt      Format listing for 80-column width.
  43.  
  44.      ----vvvv      Print on standard error the arguments passed to sub-passes and
  45.              such other information as seems interesting.
  46.  
  47.      ----eeeexxxxcccclllluuuuddddeeee    _r_e_g_e_x
  48.              excludes cross-reference data from files whose name matches
  49.              _r_e_g_e_x, where _r_e_g_e_x is a regular expression(see _r_e_g_e_x(3)).
  50.  
  51.      ----iiiinnnncccclllluuuuddddeeee    _r_e_g_e_x
  52.              includes cross-reference data from files whose name matches
  53.              _r_e_g_e_x, where _r_e_g_e_x is a regular expression(see _r_e_g_e_x(3)).  By
  54.              default everything in the named files is cross-referenced.  For
  55.              example, to cross-reference leaving out all headers from
  56.              /usr/include but including <stdio.h>, the following suffices:
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Page 1                           Release 6.4
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCXXXXRRRREEEEFFFF((((1111))))                       SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss                       CCCCXXXXRRRREEEEFFFF((((1111))))
  71.  
  72.  
  73.  
  74.         cxref -exclude '/usr/include/.*' -include '.*/stdio.h' test.c
  75.      ----rrrraaaawwww Instead of being processed into a cross reference output, the raw
  76.           cross-reference information from the C compiler is passed directly
  77.           to the output.  The format of this data is described below.
  78.  
  79.      ----rrrraaaawwwwiiiinnnn    _f_i_l_e
  80.           Pass in to _c_x_r_e_f for formatting the _f_i_l_e as if it were the output of
  81.           cxref -raw.  The file must be in the proper format: if it is not,
  82.           the result will likely be chaos.
  83.  
  84. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  85.      Most error/warning messages come from the C compiler.  The C compiler is
  86.      not the same as _c_c.
  87.  
  88. RRRRAAAAWWWW DDDDAAAATTTTAAAA FFFFOOOORRRRMMMMAAAATTTT
  89.      A cross raw reference record (the format may change from release to
  90.      release) is a line of white-space separated fields.  Each record docu-
  91.      ments a single cross-reference instance and is terminated with a new-
  92.      line.  All data is in plain text.  All numbers are in decimal.
  93.  
  94.      ssssyyyymmmmaaaaddddddddrrrr
  95.           is the integer internal symbol address.  Not used.
  96.  
  97.      ssssyyyymmmmnnnnaaaammmmeeee
  98.           is the name of a variable or function.
  99.  
  100.      ccccooooddddeeee is one of D,M,A, or R.  D if this is a declaration.  M if this is a
  101.           modification of the variable.  A if the address is taken.  R if this
  102.           is a reference to the variable or function.
  103.  
  104.      ffffiiiilllleeeennnnaaaammmmeeee
  105.           is the source file name where found.
  106.  
  107.      lllliiiinnnneeee----nnnnuuuummmmbbbbeeeerrrr
  108.           is the line number where the reference was found.
  109.  
  110.      ccccoooolllluuuummmmnnnn----nnnnuuuummmmbbbbeeeerrrr
  111.           is the column number where the reference was found.
  112.  
  113.      ttttyyyyppppeeee is one of B, F, or N.  B means this is a function body (so _c_o_d_e
  114.           above is D).  F means this is a function, not a data variable, and
  115.           not a function body (_c_o_d_e may be D, as a declaration, or A, or R).
  116.           N means this is not a function.
  117.  
  118.      ssssccccooooppppeeee----lllleeeevvvveeeellll
  119.           is an integer giving the current local scope level.  Local (inner)
  120.           scopes with no declarations are not interesting so they are not
  121.           counted.
  122.  
  123.  
  124.  
  125.  
  126. Page 2                           Release 6.4
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. CCCCXXXXRRRREEEEFFFF((((1111))))                       SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss                       CCCCXXXXRRRREEEEFFFF((((1111))))
  134.  
  135.  
  136.  
  137.      iiiinnnncccclllluuuuddddeeee----ddddeeeepppptttthhhh
  138.           is an integer giving the current #include nesting depth.
  139.  
  140. FFFFIIIILLLLEEEESSSS
  141.      /usr/bin/cxref
  142.      /usr/lib/ecfe
  143.  
  144. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  145.      cc(1)
  146.  
  147. NNNNOOOOTTTTEEEESSSS
  148.      The ----aaaaccccpppppppp option is ignored.  There is no way to combine K&R C with ANSI
  149.      cpp.
  150.  
  151.      The ----nnnnooooccccpppppppp option is ignored.  However, _c_x_r_e_f accepts files suffixed with
  152.      ._i as C files.
  153.  
  154.      The ----nnnnoooossssttttddddiiiinnnncccc option does not work.
  155.  
  156.      _c_x_r_e_f attempts to understand many of the options normally passed to
  157.      _c_c(1).  Many options are irrelevant to _c_x_r_e_f so they are silently
  158.      ignored.  Options not understood by _c_x_r_e_f must not be passed on the com-
  159.      mand line.
  160.  
  161.      Since  the compiler predefines know and created by _c_c are not identical
  162.      to those built into _c_x_r_e_f, it is wise to use ----sssshhhhoooowwww option to _c_c  to
  163.      create a script file with the -D and -U options shown as being passed to
  164.      the compiler.  Invoke _c_x_r_e_f via the script (there are too many -D items
  165.      to do this command creation reliably on the command line).  Edit the
  166.      script to remove options that _c_x_r_e_f does not understand.
  167.  
  168.      Some #pragmas known to the regular _c_c command are not known to _c_x_r_e_f, so
  169.      useless warnings about unknown pragmas may appear at times.
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192. Page 3                           Release 6.4
  193.  
  194.  
  195.  
  196.